# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:  Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-http-date
_pkgname=HTTP-Date
pkgver=6.05
pkgrel=1
pkgdesc="Perl module date conversion routines"
url="https://metacpan.org/pod/HTTP::Date"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
replaces="perl-libwww"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/O/OA/OALDERS/HTTP-Date-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="08a427a860161cd0d7a34a4fa3eb6bf6439c2504478a308ff560de0e6620c20df46f004cfcb719e3d19e35fdb650728d6983ffce1423f4d9da06f91d85c7b927  HTTP-Date-6.05.tar.gz"
